'use strict';

module.exports = app => {
    const { INTEGER, STRING, DATE, BIGINT, BOOLEAN } = app.Sequelize;

    const ThemeImage = app.model.define('theme_image', {
        id: { type: BIGINT, primaryKey: true, autoIncrement: true },
        theme_id: BIGINT,
        image: STRING(255),
        online: BOOLEAN,
        index: INTEGER,
        create_time: DATE,
        update_time: DATE,
        delete_time: DATE
    }, {
        timestamps: true,
        paranoid: true,
        createdAt: 'create_time',
        updatedAt: 'update_time',
        deletedAt: 'delete_time'
    });

    return ThemeImage;
}